package me.bincker.formwork.web.test

import org.springframework.http.HttpStatus
import org.springframework.test.util.AssertionErrors
import org.springframework.test.web.servlet.ResultMatcher

object ResultMatchers {
    val IS_OK = ResultMatcher {result->
        try {
            AssertionErrors.assertEquals("Status", HttpStatus.OK.value(), result.response.status)
        }catch (e :Throwable){
            println("response:\t${result.response.contentAsString}")
            throw e
        }
    }
}